package main

import (
	"beego/models"
	_ "beego/routers"
	"github.com/astaxie/beego"
	_ "github.com/astaxie/beego/session/redis"
)

func main() {
	//注册模板函数
	_ = beego.AddFuncMap("unixToDate", models.UnixToDate)

	//---------------------session 配置到redis里面-----------------start
	//beego.BConfig.WebConfig.Session.SessionProvider = "redis"
	//beego.BConfig.WebConfig.Session.SessionProviderConfig = "127.0.0.1:6379"
	//---------------------session 配置到redis里面-----------------end

	beego.Run()
	defer models.DB.Close()
}
